<template>
  <div @back="() => this.$router.go(-1)">
    <div class="personal-settings">
      <!--账户&个人信息-->
      <UserInfo></UserInfo>
      <!--收款账户管理-->
      <template v-if="$auth('PERSON.RECEVIE_ACCOUNT')">
        <div class="gap"></div>
        <UserBankAccount ></UserBankAccount>
      </template>
      <!--费用记录&研究合同-->
      <template v-if="haveEntranceAuth">
        <div class="gap"></div>
        <EntranceIndex/>
      </template>
      <!-- 用户登录日志 -->
      <template v-if="$auth('PERSON.PERSON_LOGIN_LOG')">
        <div class="gap"></div>
        <UserLoginLog></UserLoginLog>
      </template>
      <!-- 用户操作日志 -->
      <template v-if="$auth('PERSON.PERSON_OPERATE_LOG')">
        <div class="gap"></div>
        <UserOperatorLog></UserOperatorLog>
      </template>
    </div>
  </div>
</template>

<script>
import UserInfo from './components/UserInfo.vue'
import UserBankAccount from './components/UserBankAccount.vue'
import EntranceIndex from './entrance/index'
import UserLoginLog from './components/UserLoginLog.vue'
import UserOperatorLog from '@views/account/settings/components/UserOperatorLog.vue'

export default {
  name: 'settings-new',
  components: { UserOperatorLog, UserLoginLog, UserBankAccount, UserInfo, EntranceIndex },
  computed: {
    haveEntranceAuth () {
      return this.$auth('PERSON.FEE_APPLY') || this.$auth('PERSON.RESEARCH_CONTRACT')
    }
  }
}
</script>

<style scoped lang='less'>
.personal-settings {
  .gap {
    height: 24px;
  }
}

</style>
